<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Example 48 (ALL) - Mixing Ad Servers</title>
<script type="text/javascript" src="../dist/jquery-1.3.1.js"></script>
<script type="text/javascript" src="../dist/flowplayer-3.1.4.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/global.css" />
</head>
<body>

<h2>Example 48 (ALL) - Mixing Ad Servers</h2>
<p class="example">
This example illustrates how to mix and match ad servers. The pre-roll is to OpenX, while the 
overlay and post-roll requests are to AdTech. The overlay ad slot identifies the ad server
using the "id" config option, while the post-roll uses the "default" ad server which also
happens to be AdTech as per the "servers" config. 
</p>
<div id="container">
  <div id="player_row">
     <div id="player-left-619">
      <a class="player614x345"></a>
      <div id="container-614x280">
        <div id="companion-300x250">
           A COMPANION ADVERTISEMENT<br/>(300x250)<br/>WILL APPEAR IN HERE
          </div>
          <div id="filler-310x254">
             FILLER SPACE
          </div>
       </div>
      </div>
     <div id="player-right-600">
        <div id="companion-160x600">
          A COMPANION ADVERTISEMENT<br/>(160x600)<br/> WILL APPEAR IN HERE
        </div>
     </div>
  </div>
</div>

<script type="text/javascript">
flowplayer("a.player614x345", "../dist/flowplayer-3.1.5.swf", {
    plugins: {
        rtmp: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        rtmpInstream: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        openAdStreamer: {
            url: '../dist/OpenAdStreamer.swf',
//            "url": "/fp-http/OpenAdStreamer.swf",

            "shows": {
                "baseURL": "http://streaming.openvideoads.org/shows",
                "streams": [
                    {
                        "file":"the-black-hole.mp4",
                        "duration":"00:00:20"
                    }
                ]
            },

            "ads": {
                "servers": [
                   {
                       "id": "AdTech",
                       "type": "AdTech",
                       "defaultAdServer": true,
                       "apiAddress": "http://de.at.atwola.com/?adrawdata/3.0/515.1"
                   }
                ],
                "displayCompanions": true,
                "restoreCompanions": false,
                "companions": [
                   { "id":"companion-160x600", "width":"160", "height":"600" },
                   { "id":"companion-300x250", "width":"300", "height":"250" }
                ],
                "schedule": [
                   {
                       "zone": "5",
                       "position": "pre-roll",
                       "server": {
                           "type": "OpenX",
                           "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php",
                           "customProperties" : {
  	                          "target": "category=food" 
                           }
                       }
                   },
                   {
                       "zone": "2188757/0/1728",
                       "startTime": "00:00:03",
                       "duration": "10",
                       "server": {
                           "id": "AdTech"
                       }
                   },
                   {
                       "zone": "2189418/0/1725",
                       "position": "post-roll"
                   }
                ]
            },

            "debug": {
                "levels": "fatal, vast_template",
                "debugger": "firebug"
            }
        }
    }
});
</script>
<br/>
<p class="example">
The resulting stream configuration is as follows:
<ul>
<li>OpenX served pre-roll</li>
<li>AdTech served XML wrapper pointing to an OpenX ad request for an overlay</li>
<li>AdTech served XWML wrapper pointing to an OpenX ad request for a post-roll</li>
</ul>
</p>
<p>
The configuration for this example is:
</p>
<div class="codebox">
<pre>
<code class="javascript">
flowplayer("a.player614x345", "../dist/flowplayer-3.1.5.swf", {
    plugins: {
        rtmp: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        rtmpInstream: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        openAdStreamer: {
            url: '../dist/OpenAdStreamer.swf',

            "shows": {
                "baseURL": "http://streaming.openvideoads.org/shows",
                "streams": [
                    {
                        "file":"the-black-hole.mp4",
                        "duration":"00:00:20"
                    }
                ]
            },

            "ads": {
                "servers": [
                    {
                       "id": "AdTech",
                       "type": "AdTech",
                       "apiAddress": "http://de.at.atwola.com/?adrawdata/3.0/515.1"
                   }
                ],
                "displayCompanions": true,
                "restoreCompanions": false,
                "companions": [
                   { "id":"companion-160x600", "width":"160", "height":"600" },
                   { "id":"companion-300x250", "width":"300", "height":"250" }
                ],
                "schedule": [
                   {
                       "zone": "5",
                       "position": "pre-roll",
                       "server": {
                           "type": "OpenX",
                           "apiAddress": "http://openx.openvideoads.org/openx/www/delivery/fc.php",
                           "customProperties" : {
                               "target": "category=food" 
                           }
                       }
                   },
                   {
                       "zone": "2188757/0/1728", // composed of placement/page-id/size-id
                       "startTime": "00:00:03",
                       "duration": "10",
                       "server": {
                           "id": "AdTech"
                       }
                   },
                   {
                       "zone": "2189418/0/1725",
                       "position": "post-roll"
                   }
                ]
            },

            "debug": {
                "levels": "fatal",
                "debugger": "firebug"
            }
        }
    }
});
</code>
</pre>
</div>
<script type="text/javascript" src="js/tracking.js">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10158120-3");
if(TRACKING_TURNED_ON) {
  pageTracker._trackPageview();
}
} catch(err) {}
</script>
</body>
</html>